package org.jsola.hr.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.jsola.core.Page;
import org.jsola.core.Result;
import org.jsola.hr.dto.CompanySaleUserAddDTO;
import org.jsola.hr.dto.CompanySaleUserUpdateDTO;
import org.jsola.hr.entity.CompanySaleUserDO;
import org.jsola.hr.query.CompanySaleUserQuery;
import org.jsola.hr.vo.CompanySaleUserListVO;
import org.jsola.hr.vo.CompanySaleUserVO;

import java.util.List;

/**
 * 用工单位销售
 *
 * @author zhr
 */
@Api(tags = "hr-用工单位销售")
public interface ICompanySaleUserControllerAPI {

    /**
     * 新增用工单位销售
     *
     * @param companySaleUserAddDTO 用工单位销售新增实体
     * @return 用工单位销售展示对象
     */
    @ApiOperation(value = "新增用工单位销售")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "companySaleUserAddDTO", dataType = "CompanySaleUserAddDTO", value = "新增用工单位销售", paramType = "body")
    })
    Result<CompanySaleUserVO> save(CompanySaleUserAddDTO companySaleUserAddDTO);


    /**
     * 修改用工单位销售
     *
     * @param companySaleUserUpdateDTO 用工单位销售
     * @return 更新数量
     */
    @ApiOperation(value = "修改用工单位销售")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "companySaleUserUpdateDTO", dataType = "CompanySaleUserUpdateDTO", value = "修改用工单位销售", paramType = "body")
    })
    Result<Integer> update(CompanySaleUserUpdateDTO companySaleUserUpdateDTO);


    /**
     * 删除单个用工单位销售，彻底删除
     *
     * @param companySaleUserId 用工单位销售id
     * @return 删除数量
     */
    @ApiOperation(value = "删除单个用工单位销售，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "companySaleUserId", dataType = "String", value = "用工单位销售id", paramType = "path")
    })
    Result<Integer> delete(String companySaleUserId);


    /**
     * 批量删除用工单位销售，彻底删除
     *
     * @param companySaleUserIds 用工单位销售id集合
     * @return 删除数量
     */
    @ApiOperation(value = "批量删除用工单位销售，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "companySaleUserIds", dataType = "String[]", value = "用工单位销售id数组", paramType = "body", allowMultiple = true)
    })
    Result<Integer> deleteBatch(String[] companySaleUserIds);


    /**
     * 根据用工单位销售id查询用工单位销售详情
     *
     * @param companySaleUserId 用工单位销售id
     * @return 用工单位销售详情
     */
    @ApiOperation(value = "根据用工单位销售id查询用工单位销售详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "companySaleUserId", dataType = "String", value = "用工单位销售id", paramType = "path")
    })
    Result<CompanySaleUserVO> findById(String companySaleUserId);


    /**
     * 查询用工单位销售
     *
     * @param companySaleUserQuery 用工单位销售查询参数
     * @return page
     */
    @ApiOperation(value = "查询用工单位销售")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "companySaleUserQuery", dataType = "CompanySaleUserQuery", value = "用工单位销售查询参数", paramType = "query")
    })
    Result<List<CompanySaleUserListVO>> listAll(CompanySaleUserQuery companySaleUserQuery);


    /**
     * 分页查询用工单位销售
     *
     * @param companySaleUserQuery 用工单位销售查询参数
     * @return page
     */
    @ApiOperation(value = "分页查询用工单位销售")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "companySaleUserQuery", dataType = "CompanySaleUserQuery", value = "用工单位销售查询参数", paramType = "query")
    })
    Result<Page<CompanySaleUserListVO>> page(CompanySaleUserQuery companySaleUserQuery);

    /**
     * 查询对应用工单位下的销售
     *
     * @param companyId 用工单位Id
     * @return 销售
     */
    @ApiOperation(value = "查询对应用工单位下的销售")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "companyId", dataType = "String", value = "用工单位Id", paramType = "query")
    })
    Result<List<CompanySaleUserDO>> selectSaleUserByCompanyId(String companyId);
}

